<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %>

<t:panelGrid>
	<h:graphicImage url="/image/logo.gif"></h:graphicImage>
</t:panelGrid>

<authz:authorize ifAllGranted="ROLE_ADMIN">

<t:panelGrid columns="7" >
	<t:column style="align:left">
	    <h:commandLink action="#{menuBean.navHomeAction}" value="#{messages['home']}" styleClass="menuText_Label">
        </h:commandLink>
    </t:column>
    
    
  	<t:column style="align:left">
       <rich:dropDownMenu  value="#{messages['security.menu']}" styleClass="menuText_Label" >
       	<rich:menuItem value="#{messages['user.mgmt.menu']}" action="listUser"></rich:menuItem>
       </rich:dropDownMenu>
    </t:column>
    
    
	<t:column style="align:left">
		<rich:dropDownMenu value="#{messages['master.setup']}" >
		   <rich:menuGroup  value="#{messages['common.setup.menu']}"  >
			   <rich:menuItem value="#{messages['country.menu']}" immediate="true"  action="#{menuBean.navCountryAction}" />
			   <rich:menuItem value="#{messages['state.menu']}" immediate="true" action="#{menuBean.navStateAction}" />
			   <rich:menuItem value="#{messages['salutation.menu']}" immediate="true" action="#{menuBean.navSalutationAction}" />
			   <rich:menuItem value="#{messages['race.menu']}" immediate="true" action="#{menuBean.navRaceAction}" />  	
			</rich:menuGroup>
		   
		   <rich:menuItem value="#{messages['branch.menu']}" immediate="true" action="#{menuBean.navBranchAction}"></rich:menuItem>
		   <rich:menuItem value="#{messages['territory.menu']}" immediate="true" action="#{menuBean.navTerritoryAction}"></rich:menuItem>
		   <rich:menuItem value="#{messages['agent.menu']}" immediate="true" action="#{menuBean.navAgentAction}"></rich:menuItem>
		   <rich:menuItem value="#{messages['status.menu']}" immediate="true" action="#{menuBean.navStatusAction}"></rich:menuItem>
		    <rich:menuItem value="#{messages['calendar.menu']}" immediate="true" action="#{menuBean.navCalendarAction}"></rich:menuItem>
		     <rich:menuItem value="#{messages['installment.schema.menu']}" immediate="true" action="#{menuBean.navSchemaAction}"></rich:menuItem>
		   <rich:menuItem value="#{messages['product.menu']}" immediate="true" action="#{menuBean.navProductAction}"></rich:menuItem>
		   
		   <rich:menuGroup  value="#{messages['booking.setup.menu']}"  >
		   		<rich:menuItem value="#{messages['hotel.resort.menu']}"  immediate="true" action="#{menuBean.navHotelResortAction}" />
		   		<rich:menuItem value="#{messages['hotel.rci.resort.menu']}"  immediate="true" action="#{menuBean.navRciResortAction}" />
		   		<rich:menuItem value="#{messages['hotel.room.type.menu']}"  immediate="true" action="#{menuBean.navRoomTypeAction}" />
		   		<rich:menuItem value="#{messages['period.menu']}"  immediate="true" action="" />
		   		<rich:menuItem value="#{messages['vacation.period.menu']}"  immediate="true" action="" />
		   </rich:menuGroup>
		   
		   <rich:menuGroup  value="#{messages['finance.setup.menu']}"  >
		   		<rich:menuItem value="#{messages['document.control.menu']}" immediate="true" action="#{menuBean.navDocControlAction}" ></rich:menuItem> 
		   		<rich:menuItem value="#{messages['currency.menu']}" immediate="true" action="#{menuBean.navCurrencyAction}" ></rich:menuItem>
		   		<rich:menuItem value="#{messages['currency.rate.menu']}"  immediate="true" action="#{menuBean.navCurrencyRateAction}" />
		   		<rich:menuItem value="#{messages['trans.type.menu']}" immediate="true" action="#{menuBean.navTransTypeAction}"></rich:menuItem>
		   </rich:menuGroup>
		</rich:dropDownMenu>
	</t:column>
	
	<t:column style="align:left">
        <rich:dropDownMenu value="#{messages['member.services.menu']}" >
            <rich:menuItem value="#{messages['prospect.mgmt.menu']}" immediate="true" action="#{menuBean.navProspectAction}"></rich:menuItem>
        	<rich:menuItem value="#{messages['agreement.mgmt.menu']}" immediate="true" action="#{menuBean.navAgreementAction}"></rich:menuItem>
        	<rich:menuItem value="#{messages['member.mgmt.menu']}" immediate="true" action="#{menuBean.navMemberAction}"></rich:menuItem>
        	<%--<rich:menuItem value="#{messages['doc.check.list']}" immediate="true" action="#{menuBean.navCheckListAction}"></rich:menuItem>
        	<rich:menuItem value="#{messages['member.installment.plan.menu']}" immediate="true" action=""></rich:menuItem>--%>
        	
        	<rich:menuGroup  value="#{messages['admin.hotel.booking.menu']}"  >
        		<rich:menuItem value="#{messages['admin.hotel.member.booking.menu']}" action=""></rich:menuItem>
        		<rich:menuItem value="#{messages['admin.hotel.member.booking.cancel.menu']}" action=""></rich:menuItem>
        	</rich:menuGroup>
        </rich:dropDownMenu>
    </t:column>
    
    <t:column style="align:left">
        <rich:dropDownMenu value="#{messages['finance.menu']}" >
            <rich:menuGroup  value="#{messages['payment.menu']}"  >
            	<rich:menuItem value="#{messages['prospect.deposit.payment.menu']}" immediate="true" action="#{menuBean.navSearchProspectDepositPayment}"></rich:menuItem>
        	    <rich:menuItem value="#{messages['prospect.refund.payment.menu']}" immediate="true" action="#{menuBean.navSearchProspectRefundPayment}"></rich:menuItem>
        	    <rich:menuItem value="#{messages['member.payment.menu']}" action=""></rich:menuItem>
        	</rich:menuGroup>
            <rich:menuGroup  value="#{messages['invoice.menu']}"  >
            	<rich:menuItem value="#{messages['create.monthly.member.invoice.menu']}" action="#{menuBean.navMemberAccountInvoicingAction}"></rich:menuItem>
            </rich:menuGroup>
        	<rich:menuItem value="#{messages['member.account.statement.menu']}" action="#{menuBean.navMemberAccountAction}" immediate="true"></rich:menuItem>
        </rich:dropDownMenu>
    </t:column>

	
    <t:column style="align:left">
        <rich:dropDownMenu value="#{messages['reports.menu']}" >
            <rich:menuItem value="#{messages['report.batch.invoices.menu']}" action=""></rich:menuItem>
        	<rich:menuItem value="#{messages['report.batch.receipts.menu']}" action=""></rich:menuItem>
        	<rich:menuItem value="#{messages['report.batch.creditnote.menu']}" action=""></rich:menuItem>
        	<rich:menuItem value="#{messages['report.member.aging.menu']}" action=""></rich:menuItem>
        </rich:dropDownMenu>
    </t:column>
    
	<t:column style="align:left">
		<h:commandLink value="#{messages['logout']}" action="logout" styleClass="menuText_Label"></h:commandLink>
	</t:column>

</t:panelGrid>

</authz:authorize>

<authz:authorize ifAnyGranted="ROLE_MEMBER,ROLE_AGENT,ROLE_PARTNER" >
	<t:panelGrid columns="4" >
		<t:column style="align:left">
		    <h:commandLink action="#{menuBean.navHomeAction}" value="#{messages['home']}" styleClass="menuText_Label">
	        </h:commandLink>
	    </t:column>
	    
	    <t:column style="align:left">
	       <rich:dropDownMenu  value="#{messages['security.menu']}" styleClass="menuText_Label" >
	       	<rich:menuItem value="#{messages['chg.pwd.menu']}" ></rich:menuItem>
	       </rich:dropDownMenu>
	    </t:column>
    
    <authz:authorize ifAllGranted="ROLE_MEMBER">
    	<t:column style="align:left">
	       <rich:dropDownMenu  value="#{messages['my.member.menu']}" styleClass="menuText_Label" >
	       	  <rich:menuItem value="#{messages['my.member.profile.menu']}" ></rich:menuItem>
	       	  <rich:menuItem value="#{messages['my.booking.enquiry.menu']}" ></rich:menuItem>
	       	  <rich:menuItem value="#{messages['my.booking.cancellation.menu']}" ></rich:menuItem>
	       	  <rich:menuItem value="#{messages['my.point.enquiry.menu']}" ></rich:menuItem>
	       </rich:dropDownMenu>
	    </t:column>
    </authz:authorize>
    
    <authz:authorize ifAllGranted="ROLE_AGENT">
    	<t:column style="align:left">
	       <rich:dropDownMenu  value="#{messages['my.agent.menu']}" styleClass="menuText_Label" >
	       	  <rich:menuItem value="#{messages['my.agent.profile.menu']}" ></rich:menuItem>
	       	  <rich:menuItem value="#{messages['my.agent.member.booking.menu']}" ></rich:menuItem>
	       </rich:dropDownMenu>
	    </t:column>
    </authz:authorize>    
	
	<authz:authorize ifAllGranted="ROLE_PARTNER">
    	<t:column style="align:left">
	       <rich:dropDownMenu  value="#{messages['my.partner.menu']}" styleClass="menuText_Label" >
	       	  <rich:menuItem value="#{messages['my.partner.profile.menu']}" ></rich:menuItem>
	       	  <rich:menuItem value="#{messages['my.partner.chk.reservation.menu']}" ></rich:menuItem>
	       </rich:dropDownMenu>
	    </t:column>
    </authz:authorize>
          
	    <t:column style="align:left">
			<h:commandLink value="#{messages['logout']}" action="logout" styleClass="menuText_Label"></h:commandLink>
		</t:column>
	</t:panelGrid>
</authz:authorize>
